package com.dream.keigezhushou.Activity.acty.personal;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.dream.keigezhushou.Activity.activity.BaseActivity;
import com.dream.keigezhushou.R;

import butterknife.BindView;
import butterknife.ButterKnife;

public class UserInfoActivity extends BaseActivity implements View.OnClickListener{

    @BindView(R.id.iv_return)
    ImageView ivReturn;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.rl_user_pic)
    RelativeLayout rlUserPic;
    @BindView(R.id.rl_nick)
    RelativeLayout rlNick;
    @BindView(R.id.rl_male)
    RelativeLayout rlMale;
    @BindView(R.id.tv_sign)
    TextView tvSign;
    private Intent intent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_info);
        ButterKnife.bind(this);

        initView();
        initData();
    }

    //初始化界面
    protected void initView(){

        tvTitle.setText("个人信息");
    }

    //初始化数据
    protected void initData(){

        ivReturn.setOnClickListener(this);
        rlUserPic.setOnClickListener(this);
        rlNick.setOnClickListener(this);
        rlMale.setOnClickListener(this);
        tvSign.setOnClickListener(this);
    }


    //点击事件的实现

    @Override
    public void onClick(View view) {

        switch (view.getId()){

            case R.id.iv_return:

                //返回
                finish();
                break;

            case R.id.rl_user_pic:
                break;

            case R.id.rl_nick:

                intent = new Intent(this,AlterNickActivity.class);
                startActivity(intent);
                break;

            case R.id.rl_male:

                intent = new Intent(this,AlterMaleActivity.class);
                startActivity(intent);
                break;

            case R.id.tv_sign:

                intent = new Intent(this,AlterSignActivity.class);
                startActivity(intent);
                break;

        }
    }
}
